package org.javaboy.actuator_demo.config;

import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Component
public class AppInfo implements InfoContributor {
    @Override
    public void contribute(Info.Builder builder) {
        Map<String, Object> app = new HashMap<>();
        app.put("version", "0.0.1");
        app.put("author", "javaboy");
        builder.withDetail("app", app);
    }
}
